package com.inxedu.os.edu.service.subject.subjectImpl;

import com.inxedu.os.edu.dao.SysSubjectMapper;
import com.inxedu.os.edu.pojo.SysSubject;
import com.inxedu.os.edu.pojo.SysSubjectExample;
import com.inxedu.os.edu.service.subject.SubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubjectServiceImpl implements SubjectService {
    @Autowired
    private SysSubjectMapper sysSubjectMapper;
    @Override
    public SysSubject getSubjectBySubjectId(int id) {
        return sysSubjectMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<SysSubject> getSubjectList() {
        SysSubjectExample example=new SysSubjectExample();
        return sysSubjectMapper.selectByExample(example);
    }
}
